package com.ymk.service.impl;


import com.ymk.base.mybatis.DaoRouter;
import com.ymk.base.mybatis.Pagination;
import com.ymk.bo.rbac.RbacPermBO;
import com.ymk.service.IRbacPermService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class RbacPermService implements IRbacPermService {

    @Override
    public RbacPermBO get(Map map) {
        return this.daoRouter.queryForObject("RbacPerm.loadRbacPerm",map);
    }

    @Override
    public List<RbacPermBO> list(Map map) {
        return this.daoRouter.query("RbacPerm.loadRbacPerm",map);
    }

    @Override
    public List<RbacPermBO> listForPage(Pagination pagination) {
        return null;
    }

    @Override
    public void post(RbacPermBO rbacPermBO) {
        this.daoRouter.insert("ARbacPerm.insertRbacPerm",rbacPermBO);
    }

    @Override
    public void update(RbacPermBO rbacPermBO) {
        this.daoRouter.update("ARbacPerm.updateRbacPerm",rbacPermBO);
    }

    @Override
    public void del(RbacPermBO rbacPermBO) {
        this.daoRouter.update("ARbacPerm.delRbacPerm",rbacPermBO);
    }

    @Autowired
    private DaoRouter daoRouter;
}
